home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Mathematics / Notebooks / Cantor / Cantor3.ma < prev    next >
Encoding:
Text File  |  1992-08-07  |  31.0 KB  |  384 lines

  1. (*^
  2.  
  3. ::[paletteColors = 128; showRuler; automaticGrouping; magnification = 125; currentKernel; 
  4.     fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e8,  24, "Times"; ;
  5.     fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6,  18, "Times"; ;
  6.     fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, L1, e6,  14, "Times"; ;
  7.     fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20,  18, "Times"; ;
  8.     fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L1, a15,  14, "Times"; ;
  9.     fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L1, a12,  12, "Times"; ;
  10.     fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  11.     fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  10, "Times"; ;
  12.     fontset = input, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1,  12, "Courier"; ;
  13.     fontset = output, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5,  12, "Courier"; ;
  14.     fontset = message, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  15.     fontset = print, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  16.     fontset = info, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  17.     fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1,  12, "Courier"; ;
  18.     fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1,  10, "Times"; ;
  19.     fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  20.     fontset = Left Header, nohscroll, cellOutline,  12;
  21.     fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1,  12;
  22.     fontset = Left Footer, cellOutline, blackBox,  12;
  23.     fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  10, "Times"; ;
  24.     fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  25.     fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12, "Courier"; ;
  26.     fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  27.     fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  28.     fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  29.     fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  30.     fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;]
  31. :[font = title; inactive; preserveAspect; startGroup; ]
  32. Measure and Dimension of the Cantor Set
  33. :[font = subsubtitle; inactive; preserveAspect; ]
  34. Steven R. Dunbar
  35. Department of Mathematics and Statistics
  36. University of Nebraska-Lincoln
  37. :[font = subsubtitle; inactive; preserveAspect; ]
  38. David Fowler
  39. Department of Curriculum and Instruction
  40. University of Nebraska-Lincoln
  41. :[font = smalltext; inactive; preserveAspect; right; ]
  42. ª Copyright  Steven R. Dunbar, David Fowler, 1992, All rights reserved.  T
  43. ;[s]
  44. 2:0,0;1,1;74,-1;
  45. 2:1,0,0,Symbol,0,10,0,0,0;1,9,7,Times,0,10,0,0,0;
  46. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  47. Before Starting
  48. :[font = input; preserveAspect; endGroup; ]
  49. Get["CantorSet.ma"]
  50. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  51. Lebesgue Measure
  52. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  53. Measure Zero
  54. :[font = text; inactive; preserveAspect; ]
  55. A subset  E of the real line R which can be covered by a countable collection of open intervals whose total length is arbitrarily small is said to be a set of measure zero.  The classical excluded-middle-thirds Cantor set C is a set of measure zero.   
  56. :[font = text; inactive; preserveAspect; ]
  57. Here are three stages in determining the measure of the classical Cantor set.  At each stage we use open sets containing the intervals remaining after the middle-third removal process.
  58. :[font = input; preserveAspect; ]
  59. lines[l_List] :=
  60.     Map[Line[{{#[[1]],0}, {#[[2]], 0}}] &,l];
  61. :[font = input; preserveAspect; ]
  62. superSets[f_,delta_]:=Map[{#[[1]]-delta,#[[2]]+delta} &, f]
  63. :[font = input; preserveAspect; ]
  64. rarc[s_]:=Circle[{(s[[1]]+s[[2]])/2,0},
  65.                       (s[[2]]-s[[1]])/2, {-Pi/6,Pi/6}];
  66. :[font = input; preserveAspect; ]
  67. larc[s_]:=Circle[{(s[[1]]+s[[2]])/2,0},
  68.                       (s[[2]]-s[[1]])/2, {5Pi/6,7Pi/6}];
  69. :[font = input; preserveAspect; ]
  70. Table[Show
  71.         [Graphics
  72.             [{Thickness[0.01], lines[intervals[k]],{Thickness[.001],
  73.             Line[{{-0.1,0},{1.1,0}}],
  74.             Map[larc,superSets[intervals[k], 0.1/2^k]],
  75.             Map[rarc,superSets[intervals[k], 0.1/2^k]]
  76.             }}],
  77.             PlotRange->{{-0.1,1.1},{-1,1}},
  78.             AspectRatio->.5],{k,3}];
  79. :[font = text; inactive; preserveAspect; ]
  80. We can show the Cantor has measure zero by using the sets resulting from the excluded-middle-thirds process.  We directly compute the total length of the intervals remaining after each of the stages of the middle-third removal process.  The reader should verify that this is permissible, since we are covering the classical  Cantor set with closed intervals instead of open intervals as in the definition. 
  81. :[font = input; preserveAspect; ]
  82. Table[  Apply[Plus, Minus[Apply[Subtract, intervals[i], {1}]]],
  83.  {i, 10}]
  84. :[font = input; preserveAspect; endGroup; ]
  85. N[%]
  86. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  87. Lebesgue Measure
  88. :[font = text; inactive; preserveAspect; ]
  89. In R, the class of Borel sets is the smallest collection of subsets of R such that
  90.     (1) every open set and every closed set is a Borel set.
  91.     (2) the union of every finite or countable collection of Borel sets is a Borel set,     and the intersection of any finite or countable collection of Borel sets is a Borel set.
  92. :[font = text; inactive; preserveAspect; ]
  93. We call  m a measure on R if m assigns a non-negative number m(A), possibly ¥, called the measure  of  A to each set A  in some class of subsets of R (for instance the Borel sets) such that:
  94.     (1)     m(Ø) = 0
  95.     (2)    m(A) £ m(B), for A ˝ B
  96.     (3)    If A1, A2, ... is a countable sequence of sets then
  97.                 m(¨i=1¥ Ai) £ ïi=1¥ m(Ai)
  98.                 
  99.         with equality if the Ai are disjoint Borel  sets.
  100. ;[s]
  101. 37:0,0;9,1;10,2;29,3;30,4;61,5;62,6;76,7;77,8;216,9;217,10;229,11;232,12;243,13;244,14;247,15;248,16;295,17;296,18;297,19;298,20;301,21;302,22;304,23;305,24;307,25;308,26;309,27;310,28;313,29;314,30;315,31;316,32;318,33;319,34;350,35;351,36;378,-1;
  102. 37:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,0,0,Symbol,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,0,0,Symbol,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  103. :[font = text; inactive; preserveAspect; ]
  104. For open and closed intervals, we take the Lebesgue measure to be  m((a,b)) = b-a, and m([a,b]) = b-a.  If A = ¨[ai,bi] is a finite or countable union of intervals, then m(A) =ï(bi-ai).  For an arbitrary Borel  set A on the real line, define
  105.     m(A) = inf ( ï (bi-ai) : A  ˝ ¨[ai,bi])
  106. that is, we look at all coverings of A by countable unions of intervals and take the smallest total interval length possible.
  107. ;[s]
  108. 35:0,0;67,1;68,2;87,3;88,4;111,5;112,6;114,7;115,8;117,9;118,10;170,11;171,12;176,13;177,14;179,15;180,16;182,17;183,18;243,19;244,20;256,21;257,22;260,23;261,24;263,25;264,26;271,27;272,28;273,29;274,30;276,31;277,32;279,33;280,34;409,-1;
  109. 35:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  110. :[font = input; preserveAspect; ]
  111. Table[  Apply[Plus, 
  112.     Minus[Apply[Subtract, cantorSet[{0,2}, 1/2.5, 1/2.5, i], {1}]]],
  113.     {i,9}]
  114. :[font = input; preserveAspect; ]
  115.  Apply[Plus, 
  116.     Minus[Apply[Subtract, cantorSet[{0,2}, 1/2.5, 1/2.5, 12], {1}]]]
  117. :[font = text; inactive; preserveAspect; endGroup; endGroup; ]
  118. From this it would appear that the generalized Cantor set of ratio 1/2.5, 1/2.5  on [0,2] has Lebesgue measure zero.   Indeed this is the case, since  at each stage of the construction there are 2n intervals of length 2 (2/5)n containing the Cantor set under consideration.  Thus the measure is zero.
  119. ;[s]
  120. 5:0,0;196,1;197,2;225,3;227,4;350,-1;
  121. 5:1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  122. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  123. Box-Counting Dimension
  124. :[font = text; inactive; preserveAspect; ]
  125. Consider a subet E of the real line R, and consider  the d-mesh on R given by the collection of intervals [n d, (n+1) d] where n is an integer.  Let Nd(F) be the number of d-mesh intervals which intersect the set F, Nd(F) = card{n : [n d, (n+1) d] ˙ F „ ˘}.
  126. ;[s]
  127. 21:0,0;57,1;58,2;109,3;110,4;118,5;119,6;150,7;151,8;172,9;173,10;217,11;218,12;236,13;237,14;241,15;249,16;252,17;253,18;254,19;255,20;257,-1;
  128. 21:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  129. :[font = input; preserveAspect; ]
  130. Show[ Graphics[ {Thickness[.004], lines[intervals[5]]}],
  131. Frame -> True,
  132. FrameTicks -> {Automatic, None},
  133. GridLines -> {Table[i/40, {i,0,40}], None},
  134. PlotRange -> {{0,1}, {-0.05, 0.05}},
  135. AspectRatio -> 0.1,
  136. PlotRegion -> {{0,0.8},{0,0.8}} ]
  137. (* Plot parameters obtained by experimentation.  
  138. Parameters added to give proper effect. *)
  139. :[font = text; inactive; preserveAspect; ]
  140. Then define the box-counting dimension of F as
  141.                                               ( log(Nd(F))
  142.           dimB(F) =         lim    -----------------
  143.                                    d -> 0       -log d
  144.   provided  the limit exists.
  145. ;[s]
  146. 9:0,0;100,1;101,2;119,3;120,4;194,5;195,6;212,7;213,8;244,-1;
  147. 9:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  148. :[font = text; inactive; preserveAspect; ]
  149. To determine the  box-counting dimension of the Cantor set with this definition requires a double limiting  process, one using the excluded-middle-thirds process to generate approximations to the Cantor set, and the other using boxes of a given size.  Nevertheless, without proving the required theorem validating the double-limit process, we can make experimental approximations to the box-counting dimension of the Cantor set.
  150. :[font = text; inactive; preserveAspect; ]
  151. We will take the list of endpoints generated by the middle-thirds process at stage n as an approximation to the Cantor set.  Then multiply each point of this set by 1/d and take the Floor  of the result.  This gives the box-index of each point   Then taking the Union gives a list of the distinct box-indices which contain an endpoint of the Cantor set.  The cardinality is then given by the Length of the list. 
  152. ;[s]
  153. 3:0,0;167,1;168,2;412,-1;
  154. 3:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  155. :[font = input; preserveAspect; ]
  156. boxCount[l_List, delta_] :=
  157.     Length[ Union[ Floor[(1/delta)*l]]]
  158. :[font = input; preserveAspect; ]
  159. boxCount[Flatten[intervals[5]], 1/40]
  160. :[font = input; preserveAspect; ]
  161. approxDimension[ l_List, delta_] := 
  162.     N[ Log[ boxCount[l,delta]]/(-Log[delta])]
  163. :[font = input; preserveAspect; ]
  164. approxDimension[ Flatten[intervals[10]], 1/2^10]
  165. :[font = text; inactive; preserveAspect; ]
  166. Alternative definitions of the box-counting dimension exist, for instance one can let Nd(F) be the smallest number of balls of radius d that cover F, or the largest number of disjoint balls of radius d that cover F.  Theorems are needed to establish that these alternate definitions are equivalent.  Taking the first alternate definition as the smallest number of balls of radius d needed to cover F, taking F as the classical Cantor set, taking  d = 1/3n, then clearly it requires at most 2n such balls to cover.  Then the dimension will be (less than)
  167.     lim n->0 (log(2n)/(-log(1/3n))) = log(2)/log(3) = 0.63093...
  168. ;[s]
  169. 21:0,0;87,1;88,2;134,3;135,4;200,5;201,6;380,7;381,8;447,9;448,10;454,11;457,12;491,13;493,14;559,15;564,16;570,17;571,18;582,19;583,20;615,-1;
  170. 21:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  171. :[font = text; inactive; preserveAspect; endGroup; ]
  172. Later we will get  theorem allowing us to calculate the dimension without approximating the limiting process in certain cases.
  173. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  174. Hausdorff Dimension
  175. :[font = text; inactive; preserveAspect; ]
  176. Let F be a subset of R, and let s be a non-negative number.  For any d > 0, define    Hds(F) = inf{ ï |Ui|s : { Ui} is a d-cover of F}.   Here |U| = sup{ | x-y | : x,y ˛ U} is the diameter of U.  A countable collection {Ui} is said to be a d-cover of F if  F ³ ¨ Ui. and each of the Ui has diameter less than d.  Define the Hausdorff s-measure as 
  177.     Hs(F) = lim d->0 Hds(F)
  178. Usually this limit is either 0 or ¥.  Finally define the Hausdorff dimension of F as
  179.     dimH(F) = inf{ s : Hs(F) = 0} = sup{s : Hs(F) = ¥}.  Note that if s = dimH(F), then Hs(F) may be 0, ¥ or some finite value.  
  180.      
  181. :[font = text; inactive; preserveAspect; ]
  182. For the Cantor set, let d > 0 given.  For n so large that 1/3n < d, the intervals remaining after n stages of the middle third removal process are a  d-cover of the Cantor set C.  Then it is easy to graph Hds(C) as a function of s for several sizes of d.
  183. ;[s]
  184. 16:0,0;24,1;30,2;61,3;63,4;65,5;68,6;71,7;72,8;150,9;151,10;206,11;207,12;208,13;252,14;253,15;255,-1;
  185. 16:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,64,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  186. :[font = input; preserveAspect; ]
  187. Plot[ { Apply[Plus, Minus[Apply[Subtract, intervals[2], {1}]]^s],
  188.         Apply[Plus, Minus[Apply[Subtract, intervals[5], {1}]]^s],
  189.         Apply[Plus, Minus[Apply[Subtract, intervals[7], {1}]]^s]},
  190.  {s,0,1}, PlotRange->{{0,1}, {0,10}}]
  191. :[font = text; inactive; preserveAspect; endGroup; ]
  192. For d < 0.63, it appears that Hds(C) is increasing and getting very large as d -> 0.  For d > 0.63 it appears that Hds(C) is going to zero as d -> 0.  From this, we should conjecture (and prove!) that dimH(C) » 0.63. 
  193. ;[s]
  194. 18:0,0;4,1;5,2;31,3;32,4;33,5;77,6;78,7;90,8;91,9;116,10;117,11;118,12;142,13;143,14;204,15;205,16;209,17;217,-1;
  195. 18:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,64,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,64,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;
  196. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  197. Similarity Dimension
  198. :[font = text; inactive; preserveAspect; ]
  199. A set of mappings S1, S2,…Sm: Rn  -> Rn is said to be a set of contractive similarities if 
  200.     | Si(x) - Si(y)| = ci |x - y|, for all x,y ˛ Rn and for all i = 1…m. 
  201. The ci are called the ratios of the similarities.   The following theorem is fundamental:
  202. ;[s]
  203. 25:0,0;19,1;20,2;23,3;24,4;27,5;28,6;31,7;32,8;38,9;39,10;96,11;97,12;104,13;105,14;113,15;114,16;136,17;137,18;139,19;140,20;168,21;169,22;185,23;191,24;252,-1;
  204. 25:1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  205. :[font = text; inactive; preserveAspect; ]
  206. Theorem:  Let mappings S1, S2,…Sm: Rn  -> Rn be a set of contractive similarities on
  207. D ³ Rn.  Then there exists a unique non-empty compact subset F that is invariant for the Si, i.e.  which satisfies
  208.         F =  ¨i=1m Si(F).
  209. Moreover, if we define a transformation S on the set of non-empty compact sets by 
  210.             S(E) =  ¨i=1m Si(E).
  211. and write Sk for the kth iterate of S given by S0(E) = E, Sk(E) = S(Sk-1(E)) for k ‡ 1, then
  212.         F = ˙k=1¥ Sk(E)
  213. for any set E in the set of non-empty compact sets such that Si(E) ³ E for each i.
  214. The Cantor set is an application of this idea which we have already seen in the context of the deterministic  iteration of the iterated-function-system idea:
  215.  
  216. ;[s]
  217. 45:0,0;24,1;25,2;28,3;29,4;32,5;33,6;36,7;37,8;43,9;44,10;86,11;88,12;175,13;176,14;207,15;208,16;211,17;212,18;214,19;215,20;314,21;315,22;318,23;319,24;321,25;322,26;338,27;339,28;375,29;376,30;386,31;387,32;396,33;399,34;426,35;427,36;430,37;431,38;433,imes,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,T1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,0,0,Symbol,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  218. :[font = input; preserveAspect; ]
  219. i0 = {{0,1}}  (* A list of intervals, here 1 interval *)
  220. :[font = input; preserveAspect; ]
  221. affinemaps = {{0,1/3},{2/3, 1/3}}
  222. (* Affine maps 0 + (1/3)x and 2/3 + (1/3)x  *)
  223. :[font = input; preserveAspect; ]
  224. mapUnion[i0,affinemaps]
  225. :[font = input; preserveAspect; ]
  226. mapUnion[%, affinemaps]
  227. :[font = input; preserveAspect; ]
  228. NestList[mapUnion[#, affinemaps] &, i0, 4] //MatrixForm
  229. :[font = text; inactive; preserveAspect; ]
  230. Here is another illustration of this theorem, this time in R2.
  231. ;[s]
  232. 3:0,0;60,1;61,2;63,-1;
  233. 3:1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  234. :[font = input; preserveAspect; ]
  235. affinemaps = {   { {0,0}, {{1/2,0},{0,1/2}}  },
  236.                  { {1/2,0}, {{1/2,0},{0,1/2}} },
  237.                  { {1/4,Sqrt[3]/4}, {{1/2,0},{0,1/2}} }
  238.              }
  239. :[font = input; preserveAspect; ]
  240. e = { {{0,0},{1,0},{1,1},{0,1}} }  (* a list of polygons! *)
  241. :[font = input; preserveAspect; ]
  242.     imagegon[pgon_] := Table[ 
  243.         Map[
  244.             affinemaps[[i,1]] + affinemaps[[i,2]] . # &, 
  245.             pgon],
  246.         {i,Length[affinemaps]}]
  247. :[font = input; preserveAspect; ]
  248. itergon[pgon_] := Partition[Flatten[imagegon[Flatten[pgon,1]],1],4]
  249. :[font = input; preserveAspect; ]
  250. graphgon[pgon_,gray_] := {GrayLevel[gray], Map[Polygon, itergon[pgon]]} 
  251. :[font = input; preserveAspect; ]
  252. Show[ Graphics[ Table[ graphgon[e2,0.5]]]
  253. :[font = input; preserveAspect; ]
  254. seq = NestList[itergon,e,6];
  255. :[font = input; preserveAspect; ]
  256. Do[seq[[i]] = 
  257.     {GrayLevel[1.0 - i*(0.9)/Length[seq]],Map[Polygon, seq[[i]]]},
  258.     {i,1,Length[seq]} ]
  259.  
  260. :[font = input; preserveAspect; ]
  261. Length[seq]
  262. :[font = input; preserveAspect; ]
  263. Show[Graphics[seq], AspectRatio -> Automatic]
  264. :[font = text; inactive; preserveAspect; ]
  265. The set of mappings S1,…Sm satisfy the open set condtion if there is a non-empty bounded open set V such that
  266.     V ²  ¨i=1m  Si(V).
  267. Here is an illustration showing that the previous example in R2 satisfies the open set condition.
  268. ;[s]
  269. 18:0,0;21,1;22,2;25,3;26,4;39,5;56,6;113,7;114,8;116,9;117,10;120,11;121,12;123,13;124,14;125,15;192,16;193,17;228,-1;
  270. 18:1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,25,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  271. :[font = input; preserveAspect; ]
  272. affinemaps = {   { {0,0}, {{1/2,0},{0,1/2}}  },
  273.                  { {1/2,0}, {{1/2,0},{0,1/2}} },
  274.                  { {1/4,Sqrt[3]/4}, {{1/2,0},{0,1/2}} }
  275.              }
  276. :[font = input; preserveAspect; ]
  277. pgon = { {0,0},{1,0},{1,1},{0,1}}
  278. :[font = input; preserveAspect; ]
  279.  
  280.     imagegons = Table[ 
  281.         Map[
  282.             affinemaps[[i,1]] + affinemaps[[i,2]] . # &, 
  283.             pgon],
  284.         {i,Length[affinemaps]}]
  285. :[font = input; preserveAspect; ]
  286. Show[ Graphics[ { GrayLevel[0.7], Polygon[ pgon], 
  287.     GrayLevel[0.3], Map[Polygon, imagegons] }], Axes -> True,
  288.      AspectRatio -> 1, PlotRange -> All ]
  289. :[font = text; inactive; preserveAspect; ]
  290. Similarity Dimension Theorem:  Suppose that the open set condition holds for the similarities Si on  Rn with ratios ci for 1 £ i £ m.  If F is the invariant set satisfying 
  291.     F =  ¨i=1m Si(F)
  292. then dimH(F) = dimB(F) = s, where s is given by 
  293.     ïi=1m  cis  =  1.
  294. ;[s]
  295. 32:0,0;95,1;96,2;102,3;103,4;117,5;118,6;125,7;126,8;128,9;130,10;179,11;180,12;183,13;184,14;185,15;186,16;187,17;199,18;200,19;209,20;210,21;241,22;242,23;243,24;245,25;248,26;249,27;250,28;253,29;254,30;255,31;258,-1;
  296. 32:1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,25,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,19,0,0,0;1,13,10,Times,64,15,0,0,0;1,0,0,Symbol,64,15,0,0,0;1,13,10,Times,32,15,0,0,0;1,13,10,Times,0,15,0,0,0;1,13,10,Times,64,15,0,0,0;1,13,10,Times,32,15,0,0,0;1,13,10,Times,64,15,0,0,0;1,13,10,Times,32,15,0,0,0;1,13,10,Times,64,15,0,0,0;
  297. :[font = text; inactive; preserveAspect; ]
  298. Using this theorem and the illustration above demonstrating that the affine mappings defing the Cantor set satisfy the open set condition, we can find the Hausdorff dimension of the Cantor set.
  299. :[font = input; preserveAspect; ]
  300. Solve[ (1/3)^s + (1/3)^s ==1, s]
  301. :[font = input; preserveAspect; endGroup; ]
  302. N[%]
  303. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  304. Basic Exercises
  305. :[font = text; inactive; preserveAspect; ]
  306. 1. a.) Suppose that instead of calculating the Lebesgue measure of the classical Cantor set with the closed intervals of the ith stage of the excluded middle third construction, we more properly use open intervals.  Suppose we cover the Cantor set  with open sets extending the intervals remaining after the middle-third removal process by an amount 1/100 on each side.  That is, if [aij,bij] is the jth interval in the ith stage of the excluded middle third process, use (aij -1/100, bij+1/100) as an open interval in the cover of the Cantor set.  Will this result in the Lebesgue measure? Explain.  
  307.     b) Extend the intervals at the ith stage by 1/(100 2i) on each side.  Wil this result in the Lebesgue measure?
  308.     c) Extend the intervals at the ith stage by 1/(100 5i) on each side.  What happens?  
  309. ;[s]
  310. 13:0,0;385,1;387,2;389,3;391,4;474,5;476,6;486,7;488,8;655,9;656,10;767,11;768,12;803,-1;
  311. 13:1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  312. :[font = text; inactive; preserveAspect; ]
  313. 2. Find the Lebesgue measure of the set {0, 1/2, 1/3, 1/4, 1/5, ...}
  314. :[font = text; inactive; preserveAspect; ]
  315. 3. Find the capacity dimension of the set {0, 1/2, 1/3, 1/4, 1/5,...}
  316. :[font = text; inactive; preserveAspect; ]
  317. 4. Find the Hausdorff dimension of the set {0, 1/2, 1/3, 1/4, 1/5, ...}
  318. :[font = text; inactive; preserveAspect; ]
  319. 5. Find the similarity dimension of the graph of the Cantor function. 
  320. :[font = text; inactive; preserveAspect; ]
  321. 6. Find the similarity  dimension of a generalized Cantor set determined by the ratios r1, and r2.
  322. ;[s]
  323. 4:0,0;88,1;89,2;96,3;101,-1;
  324. 4:1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,64,12,0,0,0;
  325. :[font = text; inactive; preserveAspect; endGroup; ]
  326. 7.  Find the dimension of the Sierpinski gasket.
  327. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  328. Try For Yourself
  329. :[font = text; inactive; preserveAspect; ]
  330. 1. Show that for any x in the open interval (0,1), there are points a, b in the classical Cantor set C such that |a-b| = x.  Thus, in some sense, the Cantor set may be thin, but it is somewhat evenly distributed.
  331. :[font = text; inactive; preserveAspect; ]
  332. 2.  Construct a Cantor-like set which has positive Lebesgue measure
  333. :[font = text; inactive; preserveAspect; endGroup; ]
  334. 3.  Under the hypotheses of the similarity dimension theorem, show that Hds(F) £ |F|s.  (This is the easy half of the proof of the theorem.  The reverse inequality is much more technical and difficult.) 
  335. ;[s]
  336. 8:0,0;73,1;74,2;75,3;79,4;80,5;84,6;85,7;206,-1;
  337. 8:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,64,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,32,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  338. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  339. Have Fun With Mathematica
  340. ;[s]
  341. 2:0,0;14,1;25,-1;
  342. 2:1,16,12,Times,1,18,0,0,0;1,17,13,Times,3,18,0,0,0;
  343. :[font = text; inactive; preserveAspect; endGroup; ]
  344. Prepare a graph or diagram of the approximate box counting dimension of the Cantor set as a function of two parameters:  the stage n of approximation of the Cantor set by the excluded-middle-third process, and the box size d.  Display how the approximations approach the dimension of the Cantor set.
  345. ;[s]
  346. 3:0,0;223,1;224,2;301,-1;
  347. 3:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  348. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  349. References
  350. :[font = text; inactive; preserveAspect; ]
  351.  Standard textbooks on Lebesgue measure are 
  352. :[font = input; preserveAspect; ]
  353. Principles of  Mathematical  Analysis,3rd edition, Chapter 10, Walter Rudin, McGraw-Hill, New York, 1976
  354. Real and Complex Analysis, 3rd edition, Walter Rudin, McGraw-Hill, New York, 1987
  355. Real Analysis, 3rd edition,  H. L. Royden, Macmillan, New York, 1988.
  356.  
  357. Our brief  and simplified treament  is based on the discussion in
  358. Fractal Geometry, K. J. Falconer, J. Wiley and Sons, New York, 1990. 
  359. ;[s]
  360. 11:0,0;37,1;105,2;130,3;187,4;202,5;213,6;216,7;324,8;340,9;392,10;394,-1;
  361. 11:1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  362. :[font = text; inactive; preserveAspect; ]
  363. The box-counting dimension is also known as the fractal dimension and the capacity dimension and it is a popular measure of a set because it is relatively easy to approximate numerically.  A reference with a number of examples is 
  364.     Fractals Everywhere, Michael Barnsley, Academic Press, New York, 1988.
  365. ;[s]
  366. 3:0,0;231,1;253,2;303,-1;
  367. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  368. :[font = text; inactive; preserveAspect; ]
  369. The Hausdorff dimension is older, more classical and somewhat harder to compute, although it has more satisfying theoretical properties.   Some references to its properties and history are
  370.     The Geometry of Fractal Sets, K. J. Falconer, Cambridge University Press,
  371.      Cambridge, 1986
  372. and
  373.     Fractal Geometry, K. J. Falconer, J. Wiley and Sons, New York, 1990.
  374. ;[s]
  375. 5:0,0;189,1;218,2;286,3;303,4;355,-1;
  376. 5:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  377. :[font = text; inactive; preserveAspect; ]
  378. An excellent treatment of the similarity dimension, from which our treatment is adapted is in 
  379. :[font = input; preserveAspect; endGroup; endGroup; ]
  380.     Fractal Geometry, K. J. Falconer, J. Wiley and Sons, New York, 1990.
  381. ;[s]
  382. 2:0,0;17,1;69,-1;
  383. 2:1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  384. ^*)